# -*- codeing = utf-8 -*-
# @Time : 2022/10/22 19:16
# @Author : ZN
# @Email : 747723508@qq.com
# @File : urls.py
# @Software: PyCharm
from .views import *
from rest_framework.routers import DefaultRouter

urlpatterns = []
router = DefaultRouter()
router.register('classifications', ClassificationViewSet)
router.register('commoditys', CommodityViewSet)
router.register('cart', ShoppingCartViewSet,basename='shoppingcart') #ShoppingCartViewSet未定义queryset需增加basename
router.register('order', OrderViewSet,basename='order') #OrderViewSet未定义queryset需增加basename
router.register('payments', PaymentViewSet,basename='payment') #PaymentViewSet未定义queryset需增加basename
urlpatterns += router.urls
